<?php

namespace App\Modules\Apicrzs\Http\Controllers\Intake;

use App\Modules\Apicrzs\Http\Controllers\BaseApicrzsController;
use App\Modules\Apicrzs\Http\Requests\ComplaintsRequest;
use App\Modules\Apicrzs\Services\Water\CouponService;
use Illuminate\Http\JsonResponse;
use Illuminate\Http\Request;

class CouponController extends BaseApicrzsController
{
    public function __construct(CouponService $authService)
    {
        $this->service = $authService;
    }

    public function lists(Request $request): JsonResponse
    {
        $params = $request->all();
        $result = $this->service->getLists($params);
        return $this->sendApiSuccess($result, $this->service->getError());

    }
    public function create(ComplaintsRequest $request): JsonResponse
    {
        return $this->createService($request);
    }
}
